3.18 \(\int \frac{\csc ^3(x)}{a+b \cot (x)} \, dx\)

Optimal. Leaf size=53 \[ \frac{\sqrt{a^2+b^2} \tanh ^{-1}\left (\frac{\sin (x) (b-a \cot (x))}{\sqrt{a^2+b^2}}\right )}{b^2}+\frac{a \tanh ^{-1}(\cos (x))}{b^2}-\frac{\csc (x)}{b} \]

[Out]

(a*ArcTanh[Cos[x]])/b^2 + (Sqrt[a^2 + b^2]*ArcTanh[((b - a*Cot[x])*Sin[x])/Sqrt[a^2 + b^2]])/b^2 - Csc[x]/b

________________________________________________________________________________________

Rubi [A]  time = 0.0848644, antiderivative size = 53, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.385, Rules used = {3510, 3486, 3770, 3509, 206} \[ \frac{\sqrt{a^2+b^2} \tanh ^{-1}\left (\frac{\sin (x) (b-a \cot (x))}{\sqrt{a^2+b^2}}\right )}{b^2}+\frac{a \tanh ^{-1}(\cos (x))}{b^2}-\frac{\csc (x)}{b} \]

Antiderivative was successfully verified.

[In]

Int[Csc[x]^3/(a + b*Cot[x]),x]

[Out]

(a*ArcTanh[Cos[x]])/b^2 + (Sqrt[a^2 + b^2]*ArcTanh[((b - a*Cot[x])*Sin[x])/Sqrt[a^2 + b^2]])/b^2 - Csc[x]/b

Rule 3510

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_)/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Dist[d^2/b^2, I
nt[(d*Sec[e + f*x])^(m - 2)*(a - b*Tan[e + f*x]), x], x] + Dist[(d^2*(a^2 + b^2))/b^2, Int[(d*Sec[e + f*x])^(m
 - 2)/(a + b*Tan[e + f*x]), x], x] /; FreeQ[{a, b, d, e, f}, x] && NeQ[a^2 + b^2, 0] && IGtQ[m, 1]

Rule 3486

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*(d*Sec[
e + f*x])^m)/(f*m), x] + Dist[a, Int[(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2
*m] || NeQ[a^2 + b^2, 0])

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3509

Int[sec[(e_.) + (f_.)*(x_)]/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Dist[f^(-1), Subst[Int[1/(a^
2 + b^2 - x^2), x], x, (b - a*Tan[e + f*x])/Sec[e + f*x]], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 + b^2, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\csc ^3(x)}{a+b \cot (x)} \, dx &=-\frac{\int (a-b \cot (x)) \csc (x) \, dx}{b^2}+\frac{\left (a^2+b^2\right ) \int \frac{\csc (x)}{a+b \cot (x)} \, dx}{b^2}\\ &=-\frac{\csc (x)}{b}-\frac{a \int \csc (x) \, dx}{b^2}-\frac{\left (a^2+b^2\right ) \operatorname{Subst}\left (\int \frac{1}{a^2+b^2-x^2} \, dx,x,(-b+a \cot (x)) \sin (x)\right )}{b^2}\\ &=\frac{a \tanh ^{-1}(\cos (x))}{b^2}+\frac{\sqrt{a^2+b^2} \tanh ^{-1}\left (\frac{(b-a \cot (x)) \sin (x)}{\sqrt{a^2+b^2}}\right )}{b^2}-\frac{\csc (x)}{b}\\ \end{align*}

Mathematica [A]  time = 0.123826, size = 67, normalized size = 1.26 \[ \frac{2 \sqrt{a^2+b^2} \tanh ^{-1}\left (\frac{b \tan \left (\frac{x}{2}\right )-a}{\sqrt{a^2+b^2}}\right )+a \left (\log \left (\cos \left (\frac{x}{2}\right )\right )-\log \left (\sin \left (\frac{x}{2}\right )\right )\right )-b \csc (x)}{b^2} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]^3/(a + b*Cot[x]),x]

[Out]

(2*Sqrt[a^2 + b^2]*ArcTanh[(-a + b*Tan[x/2])/Sqrt[a^2 + b^2]] - b*Csc[x] + a*(Log[Cos[x/2]] - Log[Sin[x/2]]))/
b^2

________________________________________________________________________________________

Maple [B]  time = 0.07, size = 107, normalized size = 2. \begin{align*} -{\frac{1}{2\,b}\tan \left ({\frac{x}{2}} \right ) }+2\,{\frac{{a}^{2}}{\sqrt{{a}^{2}+{b}^{2}}{b}^{2}}{\it Artanh} \left ( 1/2\,{\frac{2\,\tan \left ( x/2 \right ) b-2\,a}{\sqrt{{a}^{2}+{b}^{2}}}} \right ) }+2\,{\frac{1}{\sqrt{{a}^{2}+{b}^{2}}}{\it Artanh} \left ( 1/2\,{\frac{2\,\tan \left ( x/2 \right ) b-2\,a}{\sqrt{{a}^{2}+{b}^{2}}}} \right ) }-{\frac{1}{2\,b} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{-1}}-{\frac{a}{{b}^{2}}\ln \left ( \tan \left ({\frac{x}{2}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(x)^3/(a+b*cot(x)),x)

[Out]

-1/2/b*tan(1/2*x)+2/b^2/(a^2+b^2)^(1/2)*arctanh(1/2*(2*tan(1/2*x)*b-2*a)/(a^2+b^2)^(1/2))*a^2+2/(a^2+b^2)^(1/2
)*arctanh(1/2*(2*tan(1/2*x)*b-2*a)/(a^2+b^2)^(1/2))-1/2/b/tan(1/2*x)-1/b^2*a*ln(tan(1/2*x))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^3/(a+b*cot(x)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.98187, size = 370, normalized size = 6.98 \begin{align*} \frac{a \log \left (\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) \sin \left (x\right ) - a \log \left (-\frac{1}{2} \, \cos \left (x\right ) + \frac{1}{2}\right ) \sin \left (x\right ) + \sqrt{a^{2} + b^{2}} \log \left (-\frac{2 \, a b \cos \left (x\right ) \sin \left (x\right ) -{\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} - a^{2} - 2 \, b^{2} + 2 \, \sqrt{a^{2} + b^{2}}{\left (a \cos \left (x\right ) - b \sin \left (x\right )\right )}}{2 \, a b \cos \left (x\right ) \sin \left (x\right ) -{\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} + a^{2}}\right ) \sin \left (x\right ) - 2 \, b}{2 \, b^{2} \sin \left (x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^3/(a+b*cot(x)),x, algorithm="fricas")

[Out]

1/2*(a*log(1/2*cos(x) + 1/2)*sin(x) - a*log(-1/2*cos(x) + 1/2)*sin(x) + sqrt(a^2 + b^2)*log(-(2*a*b*cos(x)*sin
(x) - (a^2 - b^2)*cos(x)^2 - a^2 - 2*b^2 + 2*sqrt(a^2 + b^2)*(a*cos(x) - b*sin(x)))/(2*a*b*cos(x)*sin(x) - (a^
2 - b^2)*cos(x)^2 + a^2))*sin(x) - 2*b)/(b^2*sin(x))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\csc ^{3}{\left (x \right )}}{a + b \cot{\left (x \right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)**3/(a+b*cot(x)),x)

[Out]

Integral(csc(x)**3/(a + b*cot(x)), x)

________________________________________________________________________________________

Giac [B]  time = 1.36496, size = 146, normalized size = 2.75 \begin{align*} -\frac{a \log \left ({\left | \tan \left (\frac{1}{2} \, x\right ) \right |}\right )}{b^{2}} - \frac{\tan \left (\frac{1}{2} \, x\right )}{2 \, b} - \frac{\sqrt{a^{2} + b^{2}} \log \left (\frac{{\left | 2 \, b \tan \left (\frac{1}{2} \, x\right ) - 2 \, a - 2 \, \sqrt{a^{2} + b^{2}} \right |}}{{\left | 2 \, b \tan \left (\frac{1}{2} \, x\right ) - 2 \, a + 2 \, \sqrt{a^{2} + b^{2}} \right |}}\right )}{b^{2}} + \frac{2 \, a \tan \left (\frac{1}{2} \, x\right ) - b}{2 \, b^{2} \tan \left (\frac{1}{2} \, x\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^3/(a+b*cot(x)),x, algorithm="giac")

[Out]

-a*log(abs(tan(1/2*x)))/b^2 - 1/2*tan(1/2*x)/b - sqrt(a^2 + b^2)*log(abs(2*b*tan(1/2*x) - 2*a - 2*sqrt(a^2 + b
^2))/abs(2*b*tan(1/2*x) - 2*a + 2*sqrt(a^2 + b^2)))/b^2 + 1/2*(2*a*tan(1/2*x) - b)/(b^2*tan(1/2*x))